<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>

<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="d" uri="http://dgg.net/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>人才库</title>
    <%@ include file="../../../header.jsp" %>
</head>
<body class="body-main">
<div class="titleSearch">
    <d:hasUrlAuth authCode="ZZSC_SEE_PHONE">
       <input type="hidden" value="1" id="seeNumber"/>
    </d:hasUrlAuth>
    <d:hasUrlAuth authCode="TALENT_EDIT">
    <input type="hidden" value="1" id="edit"/>
    </d:hasUrlAuth>
    <d:hasUrlAuth authCode="TALENT_UPDATE">
        <input type="hidden" value="1" id="update"/>
    </d:hasUrlAuth>
    <d:hasUrlAuth authCode="TALENT_SUPER">
        <input type="hidden" value="1" id="super"/>
    </d:hasUrlAuth>
    <input type="hidden" value="${user.id}" id="userId">
    <form id="titleSearch">
        <div class="layui-inline">
            <label>学历：</label>
            <div class="layui-input-inline">
                <select name="education1" id="education1" class="input-style">
                    <option value="">全部</option>
                    <c:forEach var="ed" items="${talentEdcation}">
                        <option value="${ed.code}">${ed.name}</option>
                    </c:forEach>
                </select>
            </div>
        </div>
        <div class="layui-inline">
            <label>年龄：</label>
            <div class="layui-input-inline">
                <input type="text" class="input-style win250" id="talentAge1" name="talentAge1" style="width:10px !important;" placeholder="请输入"/>
            </div>
        </div>
        <div class="layui-inline">
            <label>性别：</label>
            <div class="layui-input-inline">
                <select class="select-style" name="talentSex1" id="talentSex1">
                    <option value="">全部</option>
                    <c:forEach var="s" items="${sex}">
                        <option value="${s.code}">${s.name}</option>
                    </c:forEach>
                </select>
            </div>
        </div>
        <div class="layui-inline">
            <label>期望薪资：</label>
            <div class="layui-inline">
                <input type="text" name="salaryMin1" class="input-style" id="salaryMin1" style="width:10px !important;"/>
            </div>
            <span>-</span>
            <div class="layui-inline">
                <input type="text" name="salaryMax1" class="input-style" id="salaryMax1" style="width:10px !important;"/>
            </div>
        </div>

        <div class="layui-inline">
            <label>目标行业：</label>
            <div class="tree-select-warp">
                <input type="text" class="input-style" id="targetIndustry1" name="targetIndustry1" data-id="" readonly style="width: 200px;" />
            </div>
        </div>

        <div class="layui-inline">
            <label>匹配人：</label>
            <div class="layui-input-inline">
                <select class="select-style" name="matchUserId" id="matchUserId">
                    <option value="">请选择</option>
                </select>
            </div>
        </div>
        <div class="layui-inline">
            <label>当前职位：</label>
            <div class="tree-select-warp">
                <input type="text" class="input-style" id="currentPosition1" name="currentPosition1" data-id="" readonly style="width: 200px;" />
            </div>
        </div>
        <div class="layui-inline">
            <label>人才状态：</label>
            <div class="layui-input-inline">
                <select class="select-style" name="talentStatus1" id="talentStatus1" style="width:150px">
                    <option value="">全部</option>
                    <c:forEach var="ts" items="${talentStatus}">
                        <option value="${ts.code}">${ts.name}</option>
                    </c:forEach>
                </select>
            </div>
        </div>
        <div class="layui-inline">
            <label>求职状态：</label>
            <div class="layui-input-inline">
                <select class="select-style" name="jobStatus1" id="jobStatus1" style="width:150px">
                    <option value="">全部</option>
                    <c:forEach var="js" items="${jobStatus}">
                        <option value="${js.code}">${js.name}</option>
                    </c:forEach>
                </select>
            </div>
        </div>
        <div class="layui-inline">
            <label>求职地区：</label>
                <div class="tree-select-warp">
                    <input type="text" class="input-style" id="jobArea1" name="jobArea1" data-id="" readonly style="width: 200px;" />
                </div>
        </div>
        <div class="layui-inline">
            <label>关键字：</label>
            <div class="layui-input-inline">
                <input type="text" class="input-style win250" placeholder="输入姓名/毕业院校/专业/持有证书/在职公司" id="keywords"
                       name="keywords"/>
            </div>
        </div>
        <div class="layui-inline">
            <button class="layui-btn layui-btn-mini layui-btn-normal" type="button" onclick="search('#myTable','reload')">搜索</button>
            <button class="layui-btn layui-btn-mini layui-btn-primary" type="button" onclick="cleanSearch()">清空</button>
            <button class="layui-btn layui-btn-mini layui-btn-green" type="button" onclick="exportIprocessData()">导出</button>
        </div>
    </form>


    <%--转交弹窗 end--%>

</div>
<div class="table-conter">
    <a href="javascript:void(0)" class="layui-btn layui-btn-mini" onclick="call()">打电话</a>

    <a href="javascript:void(0)" class="layui-btn layui-btn-mini" onclick="create()">新增</a>

    <d:hasUrlAuth authCode="TALENT_FILE_DOWNLOAD">
        <a href="javascript:void(0)" class="layui-btn layui-btn-mini" onclick="downFile()">简历下载</a>
    </d:hasUrlAuth>
</div>
<table id="myTable" class="cell-border crm-table">
</table>

<%@ include file="../../../footer.jsp" %>
<script src="${rootUrl}/static/js/zzsc/credential/talent/query_talent_index.js?v=${version}"></script>
<script type="text/javascript" src="${basePath}/static/js/zzsc/common/call_common.js?v=${version}"></script>
<script type="text/javascript" src="${basePath}/static/js/zzsc/production/sc_common.js?v=${version}"></script>
<script>
    $(document).ready(function () {
        $('#jobArea1').selectTree({
            check:false,   //默认为false，单选；设置为 true ，为多选
            close:true,
            search: true,
            url:cmsBaseUrl +  "/api/cms/tree_book/v1/get_tree_book_list.do?code=2147483647&type=2&level=1",
            idKey: "code",//指定id
            pIdKey: "pid",//指定pId
            idName: 'jobArea',
            dataFilter: function (treeId, parentNode, responseData) {
                return responseData.data;
            }

        });
        $('#currentPosition1').selectTree({
            check:false,   //默认为false，单选；设置为 true ，为多选
            close:true,
            search: true,
            url:cmsBaseUrl +  "/api/cms/tree_book/v1/get_tree_book_list.do?code=LTZW&type=2&level=2",
            idKey: "id",//指定id
            pIdKey: "pid",//指定pId
            idName: 'currentPosition1',
            dataFilter: function (treeId, parentNode, responseData) {
                return responseData.data;
            }

        });
        $('#targetIndustry1').selectTree({
            check:false,   //默认为false，单选；设置为 true ，为多选
            close:true,
            search: true,
            url:cmsBaseUrl +  "/api/cms/tree_book/v1/get_tree_book_list.do?code=HYFL&type=2&level=2",
            idKey: "id",//指定id
            pIdKey: "pid",//指定pId
            idName: 'targetIndustry1',
            dataFilter: function (treeId, parentNode, responseData) {
                return responseData.data;
            }

        });
        changUser($("#matchUserId"));
    });
    function changUser(obj) {
        $(obj).find("option").remove();
        $(obj).append("<option value=''>请选择</option>");
        $.post(sysInfo.basePath + '/zzsc/common/find_user_choose.do',{type:'division', locked:0}, function (result) {
            if (result.code == 0) {
                $.each(result.data, function (i, item) {
                    $(obj).append("<option value='" + item.id + "'>" + item.realName+item.loginName + "</option>");
                });
            } else {
                DGG.Errors("系统错误，请联系管理员");
            }
        });
        $(obj).select2({
            placeholder: "请选择",
            allowClear: true,
            width: "200px",
            language: "zh-CN"
        });
    }
</script>
</body>

</html>
